home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jul 89 / W0048-Virtual method call-Jul89 < prev    next >
Encoding:
Text File  |  1989-07-12  |  1.2 KB  |  35 lines  |  [TEXT/GEOL]

  1. Item    6734969                         11-July-89        09:50
  2.  
  3. From:   UK0004                          Bacchus & Smith, Paul Smith
  4.  
  5. To:     ROSENSTEIN1                     Rosenstein, Larry
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    Virtual method calls in OP
  10.  
  11. Larry,
  12.  
  13. I refer to your link last month in which you described how the Object Pascal
  14. method despatcher works. One point that is unclear to me is this:
  15.  
  16. I understand that there is one method table for each polymorphic method in an
  17. OP program. This is an inversion of the technique used by Microsoft's QP, where
  18. they have one table for each class containing a pointers to all the methods for
  19. that class: each descendant VMT is a duplicate of its ancestor, with the
  20. exception of new and overidden methods.
  21.  
  22. In Apple OP: The method dispatcher needs to identify which, out of the entries
  23. in a VMT, is appropriate to the object whose method is being called. How does
  24. it do this? Does it get passed some secret class ID that it uses to look up
  25. (elsewhere) the offset into the method table? Or is some other technique used?
  26.  
  27. Is the overhead on polymorphic method calls fixed, or is it O(override depth)?
  28.  
  29. Regards,
  30.  
  31. Paul
  32. ----
  33.  
  34.  
  35.